(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/find/index/index" ], {
    "0f60": function(e, t, n) {
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = n("ebe2");
            function i(e) {
                return function(e) {
                    if (Array.isArray(e)) return a(e);
                }(e) || function(e) {
                    if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);
                }(e) || function(e, t) {
                    if (e) {
                        if ("string" == typeof e) return a(e, t);
                        var n = Object.prototype.toString.call(e).slice(8, -1);
                        return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? a(e, t) : void 0;
                    }
                }(e) || function() {
                    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }();
            }
            function a(e, t) {
                (null == t || t > e.length) && (t = e.length);
                for (var n = 0, o = new Array(t); n < t; n++) o[n] = e[n];
                return o;
            }
            var s = {
                data: function() {
                    return {
                        handle:1,
                        mailNo: "",
                        page: 1,
                        dataSource: [],
                        payList: [ {
                            name: "余额支付",
                            val: "balance"
                        }, {
                            name: "微信支付",
                            val: "wechat"
                        } ],
                        payload: {
                            paytype: "balance",
                            ordertype: "1"
                        },
                        rulepop: !1,
                        textdecode: "&nbsp;",
                        shareImg: "",
                        haslogin: !1,
                        showSubscrilbe: !1,
                        activeTab: 1,
                        activeTabJiNum: "",
                        activeTabJiNum1: "",
                        activeTabJiNum2: "",
                        activeTabJiNum3: "",
                        activeTabJiNum4: "",
                        activeTabShNum: "",
                        alllogisticsInfo: [],
                        showMpqrcode: !1,
                        title_content: ""
                    };
                },
                components: {
                    empty: function() {
                        n.e("components/empty/empty").then(function() {
                            return resolve(n("6234"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    zbPayModal: function() {
                        n.e("components/zb-pay/zb-pay").then(function() {
                            return resolve(n("26cd"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    orderHintModal: function() {
                        n.e("components/order-hint/order-hint").then(function() {
                            return resolve(n("916a"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    lvvPopup: function() {
                        n.e("components/lvv-popup/lvv-popup").then(function() {
                            return resolve(n("b015"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    shareByWx: function() {
                        Promise.all([ n.e("common/vendor"), n.e("components/share/shareByWx") ]).then(function() {
                            return resolve(n("929b"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    subscribeBar: function() {
                        n.e("components/subscribeBar/subscribeBar").then(function() {
                            return resolve(n("825b"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                mixins: [ o.tools, o.checkLogin ],
                onPullDownRefresh: function() {
                    this.loadRes();
                },
                onReachBottom: function() {
                    this.$db.get("userToken") && 3 != this.activeTab && (this.page++, this.loadRes(!1));
                },
                methods: {
                    _showmpqrcode: function(e) {
                        console.log('e---->', e);
                        this.$refs.popup_mpcode.show();
                        this.showMpqrcode = 1;
                    },
                    hidemppopup: function() {
                        this.$refs.popup_mpcode.hide();
                        this.showMpqrcode = 0;
                    },
                    format: function(e) {
                        var t = e.split(" "), n = t[0].split("-"), o = t[1].split(":");
                        return "".concat(n[1], "-").concat(n[2], "\n").concat(o[0], ":").concat(o[1]);
                    },
                    changeTab: function(e) {
                        wx.setStorageSync('handle','');
                        6 == this.activeTab && (this.mailNo = ""), this.activeTab = e, this.loadRes();
                    },
                    loadRes: function() {
                        var cur = getCurrentPages(), pages = cur[cur.length - 1].__displayReporter.showReferpagepath;
                        console.log('----cur----',cur);
                        console.log('----pages----',pages);
                        if(pages == 'pages/member/index/index.html'){
                            var handle = wx.getStorageSync('handle');
                            console.log('handle',handle);
                        }
                        var t = this, n = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], o = this.$db.get("find_index_rulepop"), a = this.$db.get("find_index_rulepop_express_code"), s = this.$db.get("find_index_rulepop_express_channel");
                        "1" == o ? (this.rulepop = !0, setTimeout(function() {
                            t.$refs.orderHintModule.open(a, s);
                        }, 100)) : this.rulepop = !1, n && (this.page = 1, this.dataSource = []), this.$db.get("userToken") && this.$api.orderListApi({
                            mailNo: this.mailNo,
                            page: this.page,
                            limit: 5,
                            handle: handle?handle:this.activeTab
                        }, function(o) {
                            if ("1" == o.code) {
                                e.stopPullDownRefresh();
                                var a = o.data, s = a.list, c = void 0 === s ? [] : s, r = a.Jicount, l = void 0 === r ? "" : r, d = a.Shcount, u = void 0 === d ? "" : d, p = a.logisticsInfo, f = void 0 === p ? [] : p, h = a.handle, m = void 0 === h ? "" : h;
                                t.activeTabJiNum = l, t.activeTabShNum = u, t.alllogisticsInfo = f, t.activeTab = m, 
                                t.activeTabJiNum1 = a.activeTabJiNum1, t.activeTabJiNum2 = a.activeTabJiNum2, t.activeTabJiNum3 = a.activeTabJiNum3, 
                                t.activeTabJiNum4 = a.activeTabJiNum4, t.dataSource = n ? i(c) : [].concat(i(t.dataSource), i(c)), 
                                t.page > 1 && 0 === c.length && (t.$common.errorToShow("已加载全部数据"), t.page--);
                            } else t.$common.errorToShow(o.msg);
                        });
                    },
                    skipPage: function(e) {
                        this.$common.navigateTo("/pages/find/detail/detail?id=".concat(e, "&handle=").concat(this.activeTab));
                    },
                    changePay: function(e) {
                        this.payload.paytype = e, this.pay(this.activePayItem);
										},
										to_login: function(e) {
											console.log('to_login',e);
											this.$common.navigateTo("/pages/login/login");
										},
                    operate: function(t, n) {
                        if ("删除" == t){
                          this.cancels(n.id);
												}
												var str = t;
                        var reg = RegExp(/补差价/);
                        if(str.match(reg)){
                            console.log('补差价');     
                            this.diffStatus(n.id); 
                        }else if ("补差价" == t){
                            this.diffStatus(n.id);
                        }
                        if ("再来一单" == t) this.$common.navigateTo("/pages/delivery/delivery?id=".concat(n.id)); else if ("撤销运单" === t) this.$common.navigateTo("/subpages/pages/cancel-order/cancel-order?id=".concat(n.id, "&logisticID=").concat(n.logisticID, "&name=").concat(n.sender_name, "&phone=").concat(n.sender_phone)); else if ("立即支付" === t) {
                            var o = this, i = !0;
                            if ("2" == n.express_channel) if ("" == n.sendStartTime) "JD" == n.express_code ? confirmTitle = "京东快递" : "SF" == n.express_code ? confirmTitle = "顺丰快递" : "YTO" == n.express_code && (confirmTitle = "圆通快递"), 
                            i = !1, e.showModal({
                                confirmText: "再来一单",
                                content: confirmTitle + "需要预约上门取件时间，您没有预约！如需寄件，可点击【再来一单】重新预约！",
                                success: function(e) {
                                    if (e.confirm) o.$common.navigateTo("/pages/delivery/delivery?id=".concat(n.id)); else if (e.cancel) return !1;
                                }
                            }); else {
                                var a = new Date(n.sendStartTime.replace(/-/g, "/")), s = Date.parse(a) / 1e3, c = new Date();
                                Date.parse(c) / 1e3 >= s && (i = !1, e.showModal({
                                    confirmText: "再来一单",
                                    content: "抱歉，预约时间失效！如需寄件，请点击【再来一单】修改预约时间后再下单！",
                                    success: function(e) {
                                        if (e.confirm) o.$common.navigateTo("/pages/delivery/delivery?id=".concat(n.id)); else if (e.cancel) return !1;
                                    }
                                }));
                            }
                            if (0 == i) return !1;
                            o.$refs.zbPayModule.open(n.order_money || "0.00"), o.activePayItem = n;
                        }
										},
										diffStatus: function(orderId){
											console.log('orderId',orderId);
											var t = this;
											var o = this;
											this.$api.submitpayApi({
													order_id: orderId,
													paytype: 'wechat',
													ordertype: "3",
													domain: ''
											}, function(t) {
													if ("1" == t.code) {

															var n = t.data, i = n.timeStamp, a = n.nonceStr, r = n.signType, c = n.paySign;
															e.requestPayment({
																	provider: "wxpay",
																	timeStamp: i,
																	nonceStr: a,
																	package: t.data.package,
																	signType: r,
																	paySign: c,
																	success: function(e) {
																			o.$common.successToShow("支付成功", function() {
																					o.loadRes();
																			});
																	},
																	fail: function(e) {
																			o.$common.errorToShow("支付失败");
																	}
															});
													} else o.$common.errorToShow(t.msg);
											});
									},
                    tickets: function(t) {
                        var n = this, o = new Date().getHours();
                        o < 9 || o > 19 ? e.showModal({
                            title: "提醒您！",
                            confirmText: "继续帮助",
                            content: "工作时间：9:00-12:00 13:30-20:30",
                            success: function(e) {
                                e.confirm && n.$common.navigateTo("/subpages/pages/tickets/tickets?logisticID=".concat(t.logisticID, "&name=").concat(t.sender_name, "&phone=").concat(t.sender_phone));
                            }
                        }) : n.$common.navigateTo("/subpages/pages/tickets/tickets?logisticID=".concat(t.logisticID, "&name=").concat(t.sender_name, "&phone=").concat(t.sender_phone));
                    },
                    cancel: function(e) {
                        var t = this;
                        this.$api.orderCancelApi({
                            recipients_id: e
                        }, function(e) {
                            "1" == e.code ? t.$common.successToShow(e.msg, function() {
                                t.loadRes();
                            }) : t.$common.errorToShow(e.msg);
                        });
                    },
                    cancels: function(e) {
                      var t = this;
                      console.log('cance1',t);
                      console.log('cance2',e);
                      this.$api.orderCancelsApi({
                          recipients_id: e
                      }, function(e) {
                          "1" == e.code ? t.$common.successToShow(e.msg, function() {
                              t.loadRes();
                          }) : t.$common.errorToShow(e.msg);
                      });
                      console.log('cance3',e);
                  },
                    repay: function(e) {
                        var t = this;
                        this.$api.repayApi({
                            recipients_id: e
                        }, function(e) {
                            "1" == e.code ? t.$common.successToShow(e.msg, function() {
                                t.loadRes();
                            }) : t.$common.errorToShow(e.msg);
                        });
                    },
                    pay: function(t) {
                        var n = this;
                        this.payload.order_id = t.order_id, this.payload.platform = "miniapp", this.is_nocommission && (this.payload.domain = "m"), 
                        this.$api.submitpayApi(this.payload, function(o) {
                            if ("1" == o.code) if ("wechat" === n.payload.paytype) {
                                var i = o.data, a = i.timeStamp, s = i.nonceStr, c = i.signType, r = i.paySign;
                                e.requestPayment({
                                    provider: "wxpay",
                                    timeStamp: a,
                                    nonceStr: s,
                                    package: o.data.package,
                                    signType: c,
                                    paySign: r,
                                    success: function(e) {
                                        n.$common.successToShow("运单支付成功，等待快递员上门揽件", function() {
                                            n.$db.set("find_index_rulepop", "1"), n.$db.set("find_index_rulepop_express_code", t.express_code), 
                                            n.$db.set("find_index_rulepop_express_channel", t.express_channel), n.loadRes();
                                        });
                                    },
                                    fail: function(e) {}
                                });
                            } else n.$common.successToShow(o.msg, function() {
                                n.$db.set("find_index_rulepop", "1"), n.$db.set("find_index_rulepop_express_code", t.express_code), 
                                n.$db.set("find_index_rulepop_express_channel", t.express_channel), n.loadRes();
                            }); else n.$common.errorToShow(o.msg);
                        });
                    },
                    makePhone: function(t) {
                        e.makePhoneCall({
                            phoneNumber: t
                        });
                    },
                    lookShare: function() {
                        e.navigateTo({
                            url: "/pages/member/invite/invite"
                        });
                    },
                    goShare: function(e) {
                        var t = this, n = this.$db.get("userId");
                        n && this.$api.createOrderPosterApi({
                            user_id: n,
                            logisticID: e
                        }, function(e) {
                            e.data.user_poster_url && (t.shareImg = e.data.user_poster_url, t.$refs.share.show());
                        });
                    },
                    closeShare: function() {
                        this.shareImg = "", this.$refs.share.close();
                    },
                    showSubscrilbes: function() {
                        if (this.showSubscrilbe = !1, this.$store.state.is_nocommission) return !1;
                        if (this.$db.get("userToken") && "1" != this.$db.get("userInfo").subscribe_status) {
                            var e = this.$db.get("close-subscribe-date");
                            if (e) {
                                var t = new Date(), n = t.getFullYear() + "-" + (t.getMonth() + 1) + "-" + t.getDate();
                                "" != this.difference(e, n) && (this.showSubscrilbe = !0);
                            } else this.showSubscrilbe = !0;
                        }
                    },
                    difference: function(e, t) {
                        var n = new Date(e), o = new Date(t).getTime() - n.getTime();
                        return Math.floor(o / 864e5) || "";
                    }
                },
                onShow: function(t) {
                    var n = this;
                    this.$db.get("userToken") && (this.haslogin = !0, this.$api.getUserInfoApi({
                        user_id: this.$db.get("userId")
                    }, function(e) {
                        if ("1" == e.code) {
                            var t = e.data;
                            n.$db.set("userInfo", t);
                        } else n.$common.errorToShow(e.msg);
                    }));
                  
                    var o = this.$db.get("h5payed") || "", i = this.$db.get("h5payedNo"), a = this;
                    "1" != o || i ? (this.$db.del("h5payed"), this.loadRes()) : (a.$db.del("h5payed"), 
                    this.$db.set("h5payedNo", "1"), e.showModal({
                        content: "请确认微信支付是否已完成",
                        cancelText: "取消",
                        confirmText: "已完成支付",
                        confirmColor: "#1a5eff",
                        cancelColor: "#868789",
                        success: function(e) {
                            e.confirm ? a.loadRes() : e.cancel && console.log("用户点击取消");
                        }
                    })), this.showSubscrilbes();
                 
                },
                onLoad: function(e) {
                    var t = this;
                    e && e.pf_status && 200 == e.pf_status && this.$db.set("find_index_rulepop", "1"), 
                    this.$api.sentoptxt({
                        type_id: 4
                    }, function(e) {
                        "1" == e.code && e.data && (t.title_content = JSON.stringify(e.data.content));
                    }), this.$api.settravel("查快递");
                },
                  onShareAppMessage: function(e) {
            console.log('onShareAppMessage',e);
              var t = this;
              if ("button" === e.from) {
						  if ("通知收件人" == e.target.dataset.name) {
							  this.$api.settravel("通知收件人");
							  var n = e.target.dataset.logisticid, o = e.target.dataset.id;
							  console.log('-----n-------',o);
							  return new Promise(function(e) {
								  t.$api.notirecipApi({
									  logisticID: n
								  }, function(t) {
									  if ("1" == t.code) {
										  var n = t.data.user_poster_url;
										  t.shareImg = n;
										  var path = "/pages/find/detail/detail?id=".concat(o, "&handle=2&notire=1");
										  console.log('path',path);
										  n && e({
											  title: "快递正向您飞奔",
											  imageUrl: n,
											  path: "/pages/find/detail/detail?id=".concat(o, "&handle=2&notire=1")
										  });
									  }
								  });
							  });
						  }
						  return this.$api.settravel("分享订单海报"), {
							  title: "快递寄件折扣平台 运费低至4元起",
							  imageUrl: this.shareImg,
							  path: "/pages/index/index?user_id=".concat(this.$db.get("userId"))
						  };
					  }
				  }
            };
            t.default = s;
        }).call(this, n("543d").default);
    },
    "1a02": function(e, t, n) {
        n.r(t);
        var o = n("57fa"), i = n("cdd3");
        for (var a in i) "default" !== a && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(a);
        n("fd80");
        var s = n("f0c5"), c = Object(s.a)(i.default, o.b, o.c, !1, null, "63eb3956", null, !1, o.a, void 0);
        t.default = c.exports;
    },
    "57fa": function(e, t, n) {
        n.d(t, "b", function() {
            return i;
        }), n.d(t, "c", function() {
            return a;
        }), n.d(t, "a", function() {
            return o;
        });
        var o = {
            empty: function() {
                return n.e("components/empty/empty").then(n.bind(null, "6234"));
            },
            lvvPopup: function() {
                return n.e("components/lvv-popup/lvv-popup").then(n.bind(null, "b015"));
            }
        }, i = function() {
            var e = this, t = (e.$createElement, e._self._c, !(e.dataSource.length > 0) && 1 == e.haslogin && e.alllogisticsInfo.data && e.alllogisticsInfo.data && e.alllogisticsInfo.data.length > 0 ? e.__map(e.alllogisticsInfo.data, function(t, n) {
                return {
                    $orig: e.__get_orig(t),
                    m0: e.format(t.time)
                };
            }) : null);
            e.$mp.data = Object.assign({}, {
                $root: {
                    l0: t
                }
            });
        }, a = [];
    },
    7195: function(e, t, n) {
        (function(e) {
            n("98af"), o(n("66fd"));
            var t = o(n("1a02"));
            function o(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, e(t.default);
        }).call(this, n("543d").createPage);
    },
    "794c": function(e, t, n) {},
    cdd3: function(e, t, n) {
        n.r(t);
        var o = n("0f60"), i = n.n(o);
        for (var a in o) "default" !== a && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(a);
        t.default = i.a;
    },
    fd80: function(e, t, n) {
        var o = n("794c");
        n.n(o).a;
    }
}, [ [ "7195", "common/runtime", "common/vendor" ] ] ]);